import request from "../request.js"
import {
	BASE_URL,
	GET_SWIPERDATA,
	GET_CATITEMS,
	GET_FLOORSDATA,
	GET_RECOMMEND,
	GET_SEARCHVIDEO,
	GET_SEARCHMENU,
	GET_MENUDETAIL,
	GET_CATEGORIES
} from "../const.js"

const home = {
	getSwiperData() {
		return request({
			url: BASE_URL + GET_SWIPERDATA
		});
	},
	getCatitems() {
		return request({
			url: BASE_URL + GET_CATITEMS
		})
	},
	getFloorsData() {
		return request({
			url: BASE_URL + GET_FLOORSDATA
		})
	},
	getRecommend() {
		return request({
			url: BASE_URL + GET_RECOMMEND
		})
	},
	getSearchVideo() {
		return request({
			url: BASE_URL + GET_SEARCHVIDEO,
		})
	},
	getSearchMenu(data) {
		return request({
			url: BASE_URL + GET_SEARCHMENU,
			method: 'POST',
			data
		})
	},
	getMenuDetail(data) {
		return request({
			url: BASE_URL + GET_MENUDETAIL,
			method: 'POST',
			data
		})
	},
	getCategories() {
		return request({
			url: BASE_URL + GET_CATEGORIES
		});
	}
}

export default home;
